understanding dependency inversion principle